-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-19717. Resolve build error caused by missing Checker Framework (NonNull not recognized). #8015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… (NonNull not recognized).
|
||
import org.apache.hadoop.util.Preconditions; | ||
import org.checkerframework.checker.nullness.qual.Nullable; | ||
import org.apache.hadoop.thirdparty.org.checkerframework.checker.nullness.qual.Nullable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this makes the Nullable
useless, I don't think the static analyzer tools can recognize such a relocated annotation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you said makes some sense, but there are similar users in AzureBFS as well.
hadoop/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsLease.java
Line 38 in 1566613
import org.apache.hadoop.thirdparty.org.checkerframework.checker.nullness.qual.Nullable; |
@steveloughran I’d like to hear your thoughts — do you think we should reintroduce a new dependency to resolve the issue where org.checkerframework.checker.nullness.qual.Nullable cannot be found?
cc: @szetszwo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... this makes the Nullable useless, ...
Making it useless seems better than breaking the build.
Unforturately, the the builds after this remain failing.
💔 -1 overall
This message was automatically generated. |
aca0e73
to
f0c771f
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@szetszwo @pan3793 My thought is that since For now, we can use A follow-up PR can be submitted later to fully resolve this dependency problem in a cleaner way. Currently, the build result is as expected — before applying this patch, the trunk could not compile successfully, but after merging it, the build now passes under both JDK 8 and JDK 11. |
@slfan1989 , if it can fix the build, then it is fine. But the builds after this remain failing. |
@szetszwo A new issue occurred during the compilation of yarn-ui. The log output is as follows:
I tried to apply a local fix for this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 the change looks good.
I manually specified
|
@szetszwo Thank you very much for the review! |
@slfan1989 , thanks for fixing it! |
Description of PR
JIRA: HADOOP-19717. Resolve build error caused by missing Checker Framework (NonNull not recognized).
#8011 raised an issue: the build failed on the trunk branch with the following error
This is related to the Guava version upgrade in the trunk.
The dependency
org.checkerframework:checker-qual:jar
cannot be imported.We can use
org.apache.hadoop.thirdparty.org.checkerframework.checker.nullness.qual.NonNull
as a replacement fororg.checkerframework.checker.nullness.qual.NonNull
.How was this patch tested?
CI.
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?